<!DOCTYPE html>
<html lang="en">
<head>
    @@include('../_include/head.html',{
    "title":"",
    "filePath":"../.."
    })
    <link rel="stylesheet" href="../../css/examine.css">
</head>
<body class="iframe">
<div>
    <!-- 常用查询 -->
    <div class="slide layui-main x-frame2 ">
        <div class="slide-content">
            <div class="slide-content-head">常用查询</div>
            <div class="slide-content-text">
                <!--内容区域-->
                <form action="" class="layui-form x-form-box view-box" lay-filter="valForm">
                    <div class="layui-form-item" style="margin-bottom: 0;">
                        <div class="layui-inline">
                            <label class="layui-form-label">单位：</label>
                            <div class="layui-input-inline">
                                <select name="dw" lay-search>
                                    <option value="">请选择单位</option>
                                    <option value="1">北京</option>
                                    <option value="2">上海</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">姓名：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="name" placeholder="请输入姓名"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">用户名：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="username" placeholder="请输入姓名"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">证件号：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="sfzhm" placeholder="请输入证件号"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">侦查证状态：</label>
                            <div class="layui-input-inline">
                                <select name="zczzt" lay-search>
                                    <option value="">请选择侦查证状态</option>
                                    <option value="1">北京</option>
                                    <option value="2">上海</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label"></label>
                            <div class="layui-input-inline">
                                <input class="layui-btn layui-btn-normal" type="button" lay-submit
                                       lay-filter="searchList" value="查询">
                                <input class="layui-btn layui-btn-warm" type="button" value="清空">
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <!-- 侦查证列表 -->
    <div class="layui-main x-frame2 layui-collapse" lay-filter="collapsePanel">
        <div class="layui-colla-item colla-off">
            <div class="layui-colla-title">侦查证列表
                <span class="layui-colla-subtitle" style="float: right;">
                    <button class="layui-btn layui-btn-normal" id="exportList">
                        <i class="layui-icon layui-icon-download-circle"></i> 导出
                    </button>
                    <button class="layui-btn layui-btn-normal" id="batchWithdraw">
                        <i class="layui-icon layui-icon-delete"></i>批量注销
                    </button>
                    <button class="layui-btn layui-btn-normal" id="batchIssued">
                        <i class="layui-icon layui-icon-delete"></i>批量下发
                    </button>
                </span>
            </div>
            <div class="layui-colla-content layui-show layui-colla-content-footer">
                <!--内容区域-->
                <table id="myTable" lay-filter="myTable"></table>
            </div>
        </div>
    </div>
</div>
<div class="layui-colla-content layui-show layui-colla-content-footer" id="popDetails" style="display: none!important;">
    <!--内容区域-->
    <form action="" class="layui-form x-form-box" lay-filter="valForm" style="text-align: left;">
        <div class="view-box">
            <div class="case-situat">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label form-required">大单位：</label>
                        <div class="layui-input-inline">
                            <select name="module" lay-search="">
                                <option value="">请选择大单位</option>
                                <option value="1">北京</option>
                                <option value="2">上海</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label form-required">类别：</label>
                        <div class="layui-input-block">
                            <input type="radio" name="type" value="nan" title="专家">
                            <input type="radio" name="type" value="nv" title="骨干" checked>
                            <input type="radio" name="type" value="" title="侦查员">
                        </div>
                    </div>
                </div>
            </div>
            <div class="x-block-header">
                <span class="x-h-text">基本信息</span>
                <span class="x-h-line"></span>
            </div>
            <div class="layui-row">
                <div class="layui-col-md10">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">姓名：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入姓名"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">民族：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入民族"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">性别：</label>
                            <div class="layui-input-inline">
                                <input type="radio" name="sex" value="nan" title="男">
                                <input type="radio" name="sex" value="nv" title="女" checked>
                            </div>
                        </div>
                        <div class="layui-inline" style="width: 620px;">
                            <label class="layui-form-label form-required">单位：</label>
                            <div class="layui-input-inline" style="width: calc(100% - 114px)">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入所在单位"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">职务：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入职务"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">入伍时间：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="date" lay-verify="date" placeholder="请输入入伍时间"
                                       autocomplete="off" class="layui-input" id="date1">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">入党时间：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="date" lay-verify="date" placeholder="请输入入党时间"
                                       autocomplete="off" class="layui-input" id="date2">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">军衔：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入军衔"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-inline">
                            <label class="layui-form-label form-required">从职时间：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="date" lay-verify="date" placeholder="请输入从职时间"
                                       autocomplete="off" class="layui-input" id="date3">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">现职时间：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="date" lay-verify="date" placeholder="请输入现职时间"
                                       autocomplete="off" class="layui-input" id="date4">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">学历：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入学历"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">单位级别：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入单位级别"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">出生时间：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="date" lay-verify="date" placeholder="请输入出生时间"
                                       autocomplete="off" class="layui-input" id="date5">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">籍贯：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入籍贯"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">专业技术职务：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入专业技术职务"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label">参加学术团体：</label>
                            <div class="layui-input-inline">
                                <input type="text" name="title" required lay-verify="required"
                                       placeholder="请输入参加学术团体"
                                       autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">司法资格：</label>
                            <div class="layui-input-inline">
                                <input type="radio" name="sex" value="nan" title="是" checked>
                                <input type="radio" name="sex" value="nv" title="否">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <label class="layui-form-label form-required">专兼职：</label>
                            <div class="layui-input-inline">
                                <input type="radio" name="sex" value="nan" title="是" checked>
                                <input type="radio" name="sex" value="nv" title="否">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md2">
                    <div class="x-user-photo  upload-photo">
                        <img src="../../assets/images/user.png">
                    </div>
                    <button type="button" class="layui-btn layui-btn-normal upload-button-photo"
                            id="uploadPhoto">
                        上传图片
                    </button>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">业务特长：</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="" title="调查访问" lay-skin="primary" checked>
                        <input type="checkbox" name="" title="摸底排查" lay-skin="primary">
                        <input type="checkbox" name="" title="询问讯问" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                        <input type="checkbox" name="" title="电信侦查" lay-skin="primary">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">实习经历：</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="" title="总部级" lay-skin="primary" checked>
                        <input type="checkbox" name="" title="大区级" lay-skin="primary">
                        <input type="checkbox" name="" title="市县公安机关" lay-skin="primary">
                        <input type="checkbox" name="" title="省级以上公安机关" lay-skin="primary">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">评奖情况：</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="" title="三等功" lay-skin="primary" checked>
                        <input type="checkbox" name="" title="二等功" lay-skin="primary">
                        <input type="checkbox" name="" title="一等功" lay-skin="primary">
                        <input type="checkbox" name="" title="全军科技颈部三等奖" lay-skin="primary">
                        <input type="checkbox" name="" title="二等奖" lay-skin="primary">
                        <input type="checkbox" name="" title="一等奖" lay-skin="primary">
                    </div>
                </div>
            </div>
            <div class="x-list-block">
                <div class="x-block-header">
                    <span class="x-h-text">保卫业务培训经历</span>
                    <span class="x-h-line"></span>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">培训经历：</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="" title="中国刑警学院" lay-skin="primary" checked>
                        <input type="checkbox" name="" title="公安培训班" lay-skin="primary">
                        <input type="checkbox" name="" title="西安政治学院" lay-skin="primary">
                        <input type="checkbox" name="" title="总部级" lay-skin="primary">
                        <input type="checkbox" name="" title="大区级" lay-skin="primary">
                        <input type="checkbox" name="" title="军级" lay-skin="primary">
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline" style="width: 100%">
                    <label class="layui-form-label">详细情况：</label>
                    <div class="layui-input-block">
                        <textarea placeholder="请输入详细情况" class="layui-textarea"></textarea>
                    </div>
                </div>
            </div>

            <div class="x-list-block">
                <div class="x-block-header">
                    <span class="x-h-text">参与办案情况</span>
                    <span class="x-h-line"></span>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline x-full-row">
                            <textarea placeholder="请输入参与办案情况:  注明案件的类型、时间、案件名称和担负角色。示例：2013年参与侦办x军x旅李x故意杀人案侦查员"
                                      class="layui-textarea"></textarea>
                </div>
            </div>

            <div class="x-list-block">
                <div class="x-block-header">
                    <span class="x-h-text">发表文件情况</span>
                    <span class="x-h-line"></span>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline x-full-row">
                            <textarea placeholder="请输入发表文件情况:  注明杂志报刊年份和刊登文章名称。示例：2015年《军队保卫工作》发表《xx文章》"
                                      class="layui-textarea"></textarea>
                </div>
            </div>

            <div class="x-list-block">
                <div class="x-block-header">
                    <span class="x-h-text">个人简历</span>
                    <span class="x-h-line"></span>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline x-full-row">
                            <textarea placeholder="请输入个人简历:  填写入伍或入学以来的简要经历，主要内容报刊任职时间、任职单位和职务"
                                      class="layui-textarea"></textarea>
                </div>
            </div>

            <div class="x-list-block">
                <div class="x-block-header">
                    <span class="x-h-text">主要业绩</span>
                    <span class="x-h-line"></span>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline x-full-row">
                            <textarea
                                    placeholder="请输入主要业绩:  主要是与保卫有关的业绩。包括参与办案数量、参与承办课题、评功评奖情况、参与学术团体等。示例：参与案件侦办x起，分布注明承担具体任务;承担参与课题x项、获军队科技进步x等奖x项、发表学术文章xx篇，逐项分别列出；以及担任xx博士生导师、xx学会理事、xx评委会委员等。"
                                    class="layui-textarea"></textarea>
                </div>
            </div>

            <div class="x-list-block">
                <div class="x-block-header">
                    <span class="x-h-text">家庭主要成员及重要社会关系</span>
                    <span class="x-h-line"></span>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline x-full-row">
                    <table class="layui-table table-sty">
                        <thead>
                        <tr>
                            <th>关系</th>
                            <th>姓名</th>
                            <th>年龄</th>
                            <th>政治面貌</th>
                            <th>工作单位及职务</th>
                        </tr>
                        </thead>
                        <tbody>
                        <tr class="tooltip">
                            <td colspan="5">暂无附件</td>
                        </tr>
                        </tbody>
                    </table>
                    <div class="full-add-button">新增成员</div>
                </div>
            </div>

            <div class="x-list-block">
                <div class="x-block-header">
                    <span class="x-h-text">通讯信息</span>
                    <span class="x-h-line"></span>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label form-required">办公室电话：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="title" required lay-verify="required"
                               placeholder="请输入办公室电话"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label form-required">手机号码：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="title" required lay-verify="required"
                               placeholder="请输入手机号码"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label form-required">军官证号：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="title" required lay-verify="required"
                               placeholder="请输入军官证号"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label form-required">身份证号：</label>
                    <div class="layui-input-inline">
                        <input type="text" name="title" required lay-verify="required"
                               placeholder="请输入身份证号"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label form-required">通讯地址：</label>
                    <div class="layui-input-inline" style="width: 507px;">
                        <input type="text" name="title" required lay-verify="required"
                               placeholder="请输入通讯地址"
                               autocomplete="off" class="layui-input">
                    </div>
                </div>
            </div>

        </div>
        <div class="lastbtn">
            <button lay-submit lay-filter="saveSubmit" class="layui-btn layui-btn-normal"><i
                    class="layui-icon layui-icon-list">保存</i></button>
            <button class="layui-btn layui-btn-warm"><i class="layui-icon layui-icon-delete">删除</i></button>
        </div>
    </form>
</div>
@@include('../_include/js.html',{
"filePath":"../.."
})
<script type="text/html" id="operateCol">
    <a class="x-operate-btn" lay-event="details">
        <i class="layui-icon">&#xe642;</i>详情</a>
    <a class="x-operate-btn" lay-event="withdraw">
        <i class="layui-icon">&#xe640;</i>注销</a>
    <a class="x-operate-btn" lay-event="issued">
        <i class="layui-icon">&#xe641;</i>下发</a>
</script>
<script>
    var tableHead = [
        {type: 'checkbox'},
        {field: 'zczxxId', hide: true},
        {field: 'organnam', width: 100, title: '单位', align: 'center', templet: '#approvalStatus', unresize: true},
        {field: 'name', title: '姓名', align: 'center'},
        {
            field: 'xb', title: '性别', align: 'center', templet: function (d) {
                return d.xb === '1' ? '男' : d.xb === '0' ? '女' : ''
            }
        },
        {
            field: 'cssj', title: '出生时间', align: 'center', templet: function (d) {
                return new Date(d.cssj).toLocaleDateString()
            }
        },
        {field: 'jgzh', title: '军人证件号', align: 'center'},
        {field: 'zw', title: '职务', align: 'center'},
        {field: 'jx', title: '军衔', align: 'center'},
        {field: 'shr', title: '审核人', align: 'center'},
        {
            field: 'updatetime', title: '审核时间', align: 'center', sort: true, templet: function (d) {
                return new Date(d.updatetime).toLocaleDateString()
            }
        },
        {field: 'dqzt', title: '状态', align: 'center'},
        {field: 'operate', width: 200, title: '操作', align: 'center', toolbar: '#operateCol'},
    ]

    var app = {
        Table: layui.table,
        Layer: layui.layer,
        Form: layui.form,
        init() {
            this.renderTable()
            this.bindEvents()
        },
        renderTable() {
            this.Table.render({
                id: 'myTable',
                elem: '#myTable',
                url: API_HOST + '/zczhf/api/technological/list', // 异步操作数据接口
                request: {
                    pageName: 'pageNum',
                    limitName: 'pageSize'
                },
                headers: {
                    authorization: localStorage.getItem('authorization')
                },
                method: 'POST',
                parseData: function (res) { //res 即为原始返回的数据
                    return {
                        "code": res.code, //解析接口状态
                        "msg": res.msg, //解析提示文本
                        "count": res.data.total, //解析数据长度
                        "data": res.data.list //解析数据列表
                    };
                },
                contentType: 'application/json',
                limit: 10,
                page: { //开启分页
                    theme: 'table',
                    layout: ['count', 'limit', 'prev', 'page', 'next', 'skip'],
                    prev: '上一页',
                    next: '下一页'
                },
                height: 'full-100',
                cols: [tableHead]
            });
        },
        /**
         * 事件操作
         */
        bindEvents() {
            var _self = this;
            this.Table.on('tool(myTable)', function (obj) {
                var data = obj.data, layEvent = obj.event;
                switch (layEvent) {
                    case 'details': //查看详情
                        _self.Layer.open({
                            type: 2,
                            title: "查看详情",
                            content: 'details.html?zczxxid=' + data.zczxxId,
                            area: ['90%', '90%']
                        })
                        break;
                    case 'withdraw': //注销
                        // 批量删除的接口
                        _self.withdraw(data.zczxxId)
                        break;
                    case 'issued': //下发
                        _self.issued({
                            flagType: 3,
                            zczxxid: data.zczxxId
                        })
                        break;
                }
            });

            this.Form.on('submit(searchList)', function (data) {
                _self.searchList()
            })

            $('#exportList').click(function () {
                var data = _self.Table.checkStatus('myTable').data,
                    idList = [];
                if (!data.length) {
                    _self.showMessage('请至少选择一条数据进行导出！')
                    return false;
                }
                for (var i = 0; i < data.length; i++) {
                    idList.push(data[i].zczxxId)
                }
                _fn.requestData('/zczhf/api/zcz/export', {idlist: idList}, {
                    success: function (data) {
                        if (data.code === 0) {
                            _self.showMessage(data.data)
                        } else {
                            _self.showMessage(data.msg)
                        }
                    }
                }, 'post', {traditional: true})
            })

            $('#batchIssued').click(function () {
                _self.batchIssued()
            })

            $('#batchWithdraw').click(function () {
                _self.batchWithdraw()
            })
        },
        /**
         * 注销
         */
        withdraw(params) {
            var _self = this;
            this.Layer.confirm('您正在注销申请，确定注销？？', function (index) {
                _fn.requestData('/zczhf/api/technological/updateView', {zczxxid: params}, {
                    success: function (data) {
                        if (data.code === 0) {
                            _self.showMessage('注销申请成功！', function () {
                                _self.reload()
                                _self.Layer.closeAll()
                            })
                        } else {
                            _self.showMessage(data.msg)
                        }
                    }
                })
            });
        },
        /**
         * 批量注销
         */
        batchWithdraw() {
            var data = this.Table.checkStatus('myTable').data, idList = [];
            if (!data.length) {
                this.showMessage('请至少选择一条数据进行注销！')
                return false;
            }
            for (var i = 0; i < data.length; i++) {
                idList.push(data[i].zczxxId)
            }

            this.withdraw(idList.join('_'))
        },
        /**
         * 下发
         */
        issued(params) {
            var _self = this;
            this.Layer.confirm('是否下发当前信息？', function (index) {
                _fn.requestData('/zczhf/api/technological/approveBhYx', params, {
                    success: function (data) {
                        if (data.code === 0) {
                            _self.showMessage('下发成功！', function () {
                                _self.reload()
                                _self.Layer.closeAll()
                            })
                        } else {
                            _self.showMessage(data.msg)
                        }
                    }
                })
            });
        },
        /**
         * 批量下发
         */
        batchIssued() {
            var data = this.Table.checkStatus('myTable').data, idList = [];
            if (!data.length) {
                this.showMessage('请至少选择一条数据进行下发！')
                return false;
            }
            for (var i = 0; i < data.length; i++) {
                idList.push(data[i].zczxxId)
            }

            this.issued({
                flagType: 3,
                zczxxid: idList.join('_')
            })
        },
        /**
         * 查询列表
         */
        searchList() {
            console.log({
                dw: $('select[name=dw]').val(),
                name: $('input[name=name]').val(),
                username: $('input[name=username]').val(),
                sfzhm: $('input[name=sfzhm]').val()
            });
            this.Table.reload('myTable', {
                url: '../mock/list.json', // 异步操作数据接口
                // url: API_HOST + '/zczhf/api/technological/listViews', // 异步操作数据接口
                // request: {
                //     pageName: 'pageNum',
                //     limitName: 'pageSize'
                // },
                // headers: {
                //     authorization: localStorage.getItem('authorization')
                // },
                // method: 'POST',
                where: {
                    dw: $('select[name=dw]').val(),
                    name: $('input[name=name]').val(),
                    username: $('input[name=username]').val(),
                    sfzhm: $('input[name=sfzhm]').val(),
                },
                parseData: function (res) { //res 即为原始返回的数据
                    return {
                        "code": res.code, //解析接口状态
                        "msg": res.msg, //解析提示文本
                        "count": res.data.total, //解析数据长度
                        "data": res.data.list //解析数据列表
                    };
                },
                contentType: 'application/json',
                limit: 10,
                page: { //开启分页
                    theme: 'table',
                    layout: ['count', 'limit', 'prev', 'page', 'next', 'skip'],
                    prev: '上一页',
                    next: '下一页'
                },
                height: 'full-100',
                cols: [tableHead]
            })
        },
        /**
         * 显示成功、失败信息
         * @param msg
         * @param callback
         */
        showMessage(msg, callback) {
            this.Layer.msg(msg, {time: 1000}, callback && callback());
        },
        /**
         * 重载表格
         */
        reload() {
            this.Table.reload('myTable')
        }
    }

    app.init()
</script>
</body>
</html>